1. Field of the Invention
The present invention relates to a plot method and a plot apparatus suitable for expressing a curve such as an edge of a character or a figure using a curve of an nth order, e.g., a Bezier cubic curve.
2. Description of the Related Art
"Post Script" developed by Adobe Systems Co., or the like, is a well-known program language for expressing information including a character font or a figure in various equipment such as a laser beam printer and a display. In order to express a curve such as an edge of a character or a figure using such a program language, the Bezier cubic curve is finally used. The Bezier cubic curve is described in "An Introduction to Splines for use in Computer Graphics and Geometric Modeling" by Richard H. Bartels et al. published by Morgan Kaufmann Publishers. Inc, California. A character font is described in "The Metafont Book" by Donald E. Knuth published by Addison Wesley Publishing Company.
Bezier cubic curve B(t) is represented by following equation (1) using parameter t: EQU B(t)=x.sub.0 (t)Q.sub.0 +x.sub.1 (t)Q.sub.1 +x.sub.2 (t)Q.sub.2 +x.sub.3 (t)Q.sub.3 ( 1)
where
x.sub.0 (t)=(1-t).sup.3 PA1 x.sub.1 (t)=3(1-t).sup.2 t PA1 x.sub.2 (t)=3(1-t)t.sup.2 PA1 x.sub.3 (t)=t.sup.3 PA1 0.ltoreq.t.ltoreq.1 PA1 P.sub.0 (t)=(1-t).sup.3 PA1 P.sub.1 (t)=3(1-t).sup.2 t PA1 P.sub.2 (t)=3(1-t)t.sup.2 PA1 P.sub.3 (t)=t.sup.3 PA1 0.ltoreq.t.ltoreq.1, and PA1 Q.sub.0 (Q.sub.0x,Q.sub.0y) to Q.sub.3 (Q.sub.3x,Q.sub.3y) are coordinate positions designated in advance to determine a shape.
and Q.sub.0 to Q.sub.3 are points of the position vectors designated to determine a shape. Q.sub.0 and Q.sub.3 are start and end points of curve segment B(t) within the range of 0.ltoreq.t.ltoreq.1, respectively. Q.sub.0 to Q.sub.3 are also called control points.
In general, a conventional Post Script printer control section of, e.g., a desk top publishing system for printing a character font or a figure represented by a Post Script language comprises microprocessor 113 as a main unit of the control section and main memory 114, which stores programs and data of microprocessor 113, as shown in FIG. 1. An image of a page to be printed is stored in a portion of a memory area of memory 114. It is a matter of course that, in some systems, this portion is formed independently of memory 114 as a bit map memory.
In FIG. 1, microprocessor 113 is connected to desk top publishing system main unit 111 through interface 112. Microprocessor 113 interprets a Post Script language supplied from system main unit 111 through interface 112, performs the plotting calculations required for forming an edge line of a character or the like, plots the edge line, and then performs fill processing for filling an interior. Thereafter, page printing is performed by controlling a printer (not shown), e.g., a laser beam printer.
Conventional Bezier cubic curve plot processing performed by microprocessor 113 will be described with reference to a flow chart shown in FIG. 2.
Control points Q.sub.0 to Q.sub.3 are designated on a figure to be described below. X component x(t) and y component y(t) of an edge of the figure are determined from control points Q.sub.0 to Q.sub.3 using equation (1) above. Functions x(t) and y(t) are represented by following equations (2) and (3): EQU x(t)=a.sub.x t.sup.3 +b.sub.x t.sup.2 +c.sub.x t+d.sub.x ( 2) EQU y(t)=a.sub.y t.sup.3 +b.sub.y t.sup.2 +c.sub.y t+d.sub.y ( 3)
where a.sub.x, b.sub.x, c.sub.x, d.sub.x, a.sub.y, b.sub.y, c.sub.y, and d.sub.y are the coefficients determined in accordance with the x and y components of position vectors (control points) Q.sub.0 to Q.sub.3.
First, in step S11, microprocessor 113 calculates the coefficients in equations (2) and (3) from control points Q.sub.0, Q.sub.1, Q.sub.2, and Q.sub.3, of a Bezier cubic curve segment to be plotted. A domain of parameter t is equally divided into n portions (n is a predetermined number), thereby obtaining t values t.sub.1, t.sub.2, . . . , t.sub.n-1. In steps S12 to S15, x and y coordinates of each of points P.sub.1, P.sub.2, . . . , P.sub.n-1 on the curve corresponding to the respective obtained t values are calculated using equations (2) and (3). The x and y coordinates are rounded to approximate integers P.sub.i int. Data are plotted on an image memory region in memory 114 in accordance with the obtained integers. Thereafter, in step S16, adjacent points between points Q.sub.0, P.sub.1 int, P.sub.2 int, . . . , P.sub.n lint, Q.sub.3 are sequentially interpolated with straight lines, and interpolated data are plotted. In this case, value n is often 16 or 64.
However, the above conventional plot apparatus has the following problems.
That is, the Post Script language includes several hundred commands. Therefore, when microprocessor 113 serially processes interpretation of the complex Post Script language for a large amount of data to be processed, the processing speed of the system is reduced.
In addition, when an edge of a smaller character which is generally widely used is to be plotted, each of the curve segments constituting the edge of the character has a smaller value than that of a dot interval, i.e., an image lattice interval of a printer in a laser beam printer or the like. For this reason, even if t values are different, the segments are often plotted at a single lattice point. Therefore, calculation of a plot point for each t value is inefficient, resulting in a low processing speed.
Furthermore, when an edge of a larger character is to be plotted, the above problem is not significant as compared with the case wherein a smaller character is plotted. However, a plot interval is increased to a multiple of a lattice point interval. Therefore, when the edge is printed, it becomes obvious that a curve is approximated by straight lines. That is, a smooth curve cannot be obtained. This tendency is significant when the value of n is small and a curvature is large.